<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/4/24 0024
 * Time: 23:18
 */

namespace app\common\validate;


class User extends Validate
{
    protected $scene=[
        'add'=>['username','password','repassword']
    ];
    protected $rule=[
        'username'=>'require|unique:user|min:6',
        'password'=>'require|min:6',
        'repassword'=>'require|confirm:password',
    ];
    protected $message=[
        'username'=>'用户名错误',
        'password'=>'密码长度不足',
        'repassword'=>'两次密码不相同'
    ];
}